var tabs = document.querySelectorAll("ul.top-tab>li");
var pages = document.querySelectorAll("div.product-rank div.products");

tabs.forEach(function (i, index) {
  i.onmouseover = function () {
    tabs.forEach(function (t, i) {
      t.className = "";
      pages[i].style = "display: none;";
    });
    i.className = "current";
    pages[index].style = "display: block;";
  };
});
